<template>
  <el-dialog title="货位信息"
             :visible.sync="dialogForm"
             width="900px">
    <el-form :inline="true"
             ref="form"
             :model="form"
             class="add-form"
             label-width="50px">
      <el-row>
        <el-col :span="8">
          <el-form-item label="库房"
                        prop="roomName">
            <el-input type="text"
                      placeholder="请输入内容"
                      v-model="form.roomName"
                      :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="跨数"
                        prop="spanNo">
            <el-input type="text"
                      placeholder="请输入内容"
                      v-model="form.spanNo"
                      :disabled="disabled"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="间数"
                        prop="aulaNo">
            <el-select v-model="form.aulaNo"
                       placeholder="请选择"
                       :disabled="disabled"
                       clearable>
              <el-input type="text"
                        placeholder="请输入内容"
                        v-model="form.aulaNo"
                        :disabled="disabled"></el-input>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="排数"
                        prop="rowNo">
            <el-input v-model="form.rowNo"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="垛位"
                        prop="stackNo">
            <el-input v-model="form.stackNo"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="层高"
                        prop="tierNo">
            <el-input v-model="form.tierNo"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer"
         class="dialog-footer">
      <el-button type="primary"
                 @click="handleSubmit">确 定</el-button>
      <el-button @click="dialogForm = false">关 闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: 'cargoLocationInfo',
  data() {
    return {
      form: this.clearForm(),
      dialogForm: false,
      disabled: true,
    }
  },
  methods: {
    clearForm() {
      return {}
    },
    handleSubmit(){
      console.log('form',this.form)
      this.$emit('load',this.form)
      this.dialogForm = false
    }
  }
}
</script>
